package cn.rocksolid.sport.security.service;

import cn.rocksolid.sport.security.entity.CaptchaEntity;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * Captcha service
 *
 * @author Axl Zhao
 * @email axl.zhao@163.com
 */
public interface CaptchaService extends IService<CaptchaEntity> {
  /**
   * 获取图片验证码
   */
  void create(final String uuid, final String code);

  /**
   * 获取验证码，并制定超时时间。单位：秒
   */
  void create(final String uuid, final String code, final int expirePeriod);

  /**
   * 验证码效验
   *
   * @param uuid uuid
   * @param code 验证码
   *
   * @return true：成功 false：失败
   */
  boolean verify(final String uuid, final String code);
}
